<?php
/**
 * Created by PhpStorm.
 * User: 小灰灰
 * Date: 2023-11-24
 * Time: 14:05:53
 * Info:
 */

namespace app\common\model;

class CategoryChildid extends TimeInit
{

    public function manageData($cateId, $childId)
    {
        //先删除旧的
        $this->where('child_id', $childId)->delete();
        if ($cateId) {
            //再写入新的
            $this->create(['cate_id' => $cateId, 'child_id' => $childId]);
        }
    }
}
